package com.hawthorn.redis.controller;

import com.hawthorn.redis.service.appuser.AppUserCacheService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>todo app用户缓存</p>
 * @author: andy.ten@tom.com | xukaixing@hotmail.com
 * @created: 2021/12/19 2:25 PM
 * @version v1.0.1
 * @copyright: Copyright (c)  andyten
 */
@Api(tags = {"redis-appuser"})
@RestController
@RequestMapping("/appuser")
@Slf4j
public class AppUserCacheController
{
  @Autowired
  private AppUserCacheService appUserCacheService;

  /**
   * <p>todo 重新加载APP用户</p>
   * @author: andy.ten@tom.com
   * @date: 2021/12/20 8:39 PM
   * @version: 1.0.1
   */
  @ApiOperation(value = "加载->重新初始化APP用户", notes = "重新初始化APP用户")
  @ApiImplicitParams({
  })
  @GetMapping(value = "reloadAppUser")
  public void reloadAppUser()
  {
    appUserCacheService.init();
  }
}
